--------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/26_ConsumptionRobustness_log.txt
  log type:  text
 opened on:  25 Jun 2026, 13:06:17
r; t=0.00 13:06:17

. 
. use "$clean/PEP_Analysis_Sample.dta", clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.11 13:06:17

. keep if (orden == 1 | orden == 2)
(6,277 observations deleted)
r; t=0.03 13:06:17

. 
. capture gen lgasto_hogar = log(gasto_hogar + 1)
r; t=0.00 13:06:17

. gen miss_gasto = missing(gasto_capita)
r; t=0.00 13:06:17

. 
. * Helper: rdrobust LATE, returns b se p
. capture program drop _rd
r; t=0.00 13:06:17

. program define _rd, rclass
  1.     args y wv trt cond
  2.     capture rdrobust `y' date if wave_num==`wv' `cond', c(0) p(1) ///
>         kernel(triangular) bwselect(mserd) fuzzy(`trt') all
  3.     if !_rc {
  4.         return scalar b  = e(tau_bc)
  5.         return scalar se = e(se_tau_rb)
  6.         return scalar p  = e(pv_rb)
  7.     }
  8.     else {
  9.         return scalar b = .
 10.         return scalar se = .
 11.         return scalar p = .
 12.     }
 13. end
r; t=0.00 13:06:17

. 
. * Significance star helper
. capture program drop _star
r; t=0.00 13:06:17

. program define _star, rclass
  1.     args p
  2.     local s ""
  3.     if `p' < 0.10 local s "\sym{+}"
  4.     if `p' < 0.05 local s "\sym{*}"
  5.     if `p' < 0.01 local s "\sym{**}"
  6.     return local star "`s'"
  7. end
r; t=0.00 13:06:17

. 
. tempname T
r; t=0.00 13:06:17

. file open `T' using "$atab/tabA_consumption_robustness.tex", write replace text
r; t=0.02 13:06:18

. 
. file write `T' "\begin{table}[!htbp]" _n
r; t=0.00 13:06:18

. file write `T' "\centering" _n
r; t=0.00 13:06:18

. file write `T' "\caption{Robustness of the Wave-2 per-capita consumption attenuation}" _n
r; t=0.00 13:06:18

. file write `T' "\label{tab:consumption_robustness}" _n
r; t=0.00 13:06:18

. file write `T' "\begin{threeparttable}" _n
r; t=0.00 13:06:18

. file write `T' "\small" _n
r; t=0.00 13:06:18

. file write `T' "\begin{tabular}{lcc}" _n
r; t=0.00 13:06:18

. file write `T' "\toprule" _n
r; t=0.00 13:06:18

. file write `T' " & Wave 1 (2020) & Wave 2 (2021) \\" _n
r; t=0.00 13:06:18

. file write `T' " & (1) & (2) \\" _n
r; t=0.00 13:06:18

. file write `T' "\midrule" _n
r; t=0.00 13:06:18

. 
. * --- Panel A: baseline log per-capita consumption ---
. file write `T' "\multicolumn{3}{l}{\textit{Panel A. Log per-capita consumption (baseline)}} \\" _n
r; t=0.00 13:06:18

. _rd gasto_capita 1 trt_hh ""
r; t=0.30 13:06:18

. local b1 = r(b)
r; t=0.00 13:06:18

. local se1 = r(se)
r; t=0.00 13:06:18

. local p1 = r(p)
r; t=0.00 13:06:18

. _star `p1'
r; t=0.00 13:06:18

. local s1 "`r(star)'"
r; t=0.00 13:06:18

. _rd gasto_capita 2 trt_hh ""
r; t=0.26 13:06:18

. local b2 = r(b)
r; t=0.00 13:06:18

. local se2 = r(se)
r; t=0.00 13:06:18

. local p2 = r(p)
r; t=0.00 13:06:18

. _star `p2'
r; t=0.00 13:06:18

. local s2 "`r(star)'"
r; t=0.00 13:06:18

. file write `T' "Fuzzy-RD LATE & " %5.3f (`b1') "`s1' & " %5.3f (`b2') "`s2' \\" _n
r; t=0.00 13:06:18

. file write `T' " & (" %5.3f (`se1') ") & (" %5.3f (`se2') ") \\[0.3em]" _n
r; t=0.00 13:06:18

. 
. * --- Panel B: trim top 1% outliers ---
. file write `T' "\multicolumn{3}{l}{\textit{Panel B. Trimming the top 1\% of per-capita consumption}} \\" _n
r; t=0.00 13:06:18

. _rd gasto_capita 1 trt_hh "& outlier_gasto==0"
r; t=0.27 13:06:18

. local b1 = r(b)
r; t=0.00 13:06:18

. local se1 = r(se)
r; t=0.00 13:06:18

. local p1 = r(p)
r; t=0.00 13:06:18

. _star `p1'
r; t=0.00 13:06:18

. local s1 "`r(star)'"
r; t=0.00 13:06:18

. _rd gasto_capita 2 trt_hh "& outlier_gasto==0"
r; t=0.26 13:06:19

. local b2 = r(b)
r; t=0.00 13:06:19

. local se2 = r(se)
r; t=0.00 13:06:19

. local p2 = r(p)
r; t=0.00 13:06:19

. _star `p2'
r; t=0.00 13:06:19

. local s2 "`r(star)'"
r; t=0.00 13:06:19

. file write `T' "Fuzzy-RD LATE & " %5.3f (`b1') "`s1' & " %5.3f (`b2') "`s2' \\" _n
r; t=0.00 13:06:19

. file write `T' " & (" %5.3f (`se1') ") & (" %5.3f (`se2') ") \\[0.3em]" _n
r; t=0.00 13:06:19

. 
. * --- Panel C: raw (non-log) per-capita consumption ---
. file write `T' "\multicolumn{3}{l}{\textit{Panel C. Raw (non-log) per-capita consumption, million COP}} \\" _n
r; t=0.00 13:06:19

. _rd gasto_capita_raw 1 trt_hh ""
r; t=0.28 13:06:19

. local b1 = r(b)
r; t=0.00 13:06:19

. local se1 = r(se)
r; t=0.00 13:06:19

. local p1 = r(p)
r; t=0.00 13:06:19

. _star `p1'
r; t=0.00 13:06:19

. local s1 "`r(star)'"
r; t=0.00 13:06:19

. _rd gasto_capita_raw 2 trt_hh ""
r; t=0.26 13:06:19

. local b2 = r(b)
r; t=0.00 13:06:19

. local se2 = r(se)
r; t=0.00 13:06:19

. local p2 = r(p)
r; t=0.00 13:06:19

. _star `p2'
r; t=0.00 13:06:19

. local s2 "`r(star)'"
r; t=0.00 13:06:19

. file write `T' "Fuzzy-RD LATE & " %6.3f (`b1') "`s1' & " %6.3f (`b2') "`s2' \\" _n
r; t=0.00 13:06:19

. file write `T' " & (" %6.3f (`se1') ") & (" %6.3f (`se2') ") \\[0.3em]" _n
r; t=0.00 13:06:19

. 
. * --- Panel D: household-total consumption (denominator-free) ---
. file write `T' "\multicolumn{3}{l}{\textit{Panel D. Log household-total consumption (denominator-free)}} \\" _n
r; t=0.00 13:06:19

. _rd lgasto_hogar 1 trt_hh ""
r; t=0.28 13:06:19

. local b1 = r(b)
r; t=0.00 13:06:19

. local se1 = r(se)
r; t=0.00 13:06:19

. local p1 = r(p)
r; t=0.00 13:06:19

. _star `p1'
r; t=0.00 13:06:19

. local s1 "`r(star)'"
r; t=0.00 13:06:19

. _rd lgasto_hogar 2 trt_hh ""
r; t=0.28 13:06:20

. local b2 = r(b)
r; t=0.00 13:06:20

. local se2 = r(se)
r; t=0.00 13:06:20

. local p2 = r(p)
r; t=0.00 13:06:20

. _star `p2'
r; t=0.00 13:06:20

. local s2 "`r(star)'"
r; t=0.00 13:06:20

. file write `T' "Fuzzy-RD LATE & " %5.3f (`b1') "`s1' & " %5.3f (`b2') "`s2' \\" _n
r; t=0.00 13:06:20

. file write `T' " & (" %5.3f (`se1') ") & (" %5.3f (`se2') ") \\[0.3em]" _n
r; t=0.00 13:06:20

. 
. * --- Panel E: roster-size RD (denominator channel) ---
. file write `T' "\multicolumn{3}{l}{\textit{Panel E. Household roster size (per-capita denominator)}} \\" _n
r; t=0.00 13:06:20

. preserve
r; t=0.02 13:06:20

. keep if orden==1
(3,399 observations deleted)
r; t=0.01 13:06:20

. _rd size_roster 1 trt_hh ""
r; t=0.25 13:06:20

. local b1 = r(b)
r; t=0.00 13:06:20

. local se1 = r(se)
r; t=0.00 13:06:20

. local p1 = r(p)
r; t=0.00 13:06:20

. _star `p1'
r; t=0.00 13:06:20

. local s1 "`r(star)'"
r; t=0.00 13:06:20

. _rd size_roster 2 trt_hh ""
r; t=0.25 13:06:20

. local b2 = r(b)
r; t=0.00 13:06:20

. local se2 = r(se)
r; t=0.00 13:06:20

. local p2 = r(p)
r; t=0.00 13:06:20

. _star `p2'
r; t=0.00 13:06:20

. local s2 "`r(star)'"
r; t=0.00 13:06:20

. restore
r; t=0.00 13:06:20

. file write `T' "Fuzzy-RD LATE & " %5.3f (`b1') "`s1' & " %5.3f (`b2') "`s2' \\" _n
r; t=0.00 13:06:20

. file write `T' " & (" %5.3f (`se1') ") & (" %5.3f (`se2') ") \\[0.3em]" _n
r; t=0.00 13:06:20

. 
. * --- Panel F: item nonresponse on consumption ---
. file write `T' "\multicolumn{3}{l}{\textit{Panel F. Item-nonresponse rate on consumption (share missing)}} \\" _n
r; t=0.00 13:06:20

. qui sum miss_gasto if wave_num==1
r; t=0.00 13:06:20

. local m1 = r(mean)
r; t=0.00 13:06:20

. qui sum miss_gasto if wave_num==2
r; t=0.00 13:06:20

. local m2 = r(mean)
r; t=0.00 13:06:20

. file write `T' "All respondents & " %5.3f (`m1') " & " %5.3f (`m2') " \\" _n
r; t=0.00 13:06:20

. qui sum miss_gasto if wave_num==1 & rd_eligible==1
r; t=0.00 13:06:20

. local me1 = r(mean)
r; t=0.00 13:06:20

. qui sum miss_gasto if wave_num==2 & rd_eligible==1
r; t=0.00 13:06:20

. local me2 = r(mean)
r; t=0.00 13:06:20

. file write `T' "\quad Eligible & " %5.3f (`me1') " & " %5.3f (`me2') " \\" _n
r; t=0.00 13:06:20

. qui sum miss_gasto if wave_num==1 & rd_eligible==0
r; t=0.00 13:06:20

. local mi1 = r(mean)
r; t=0.00 13:06:20

. qui sum miss_gasto if wave_num==2 & rd_eligible==0
r; t=0.00 13:06:20

. local mi2 = r(mean)
r; t=0.00 13:06:20

. file write `T' "\quad Ineligible & " %5.3f (`mi1') " & " %5.3f (`mi2') " \\" _n
r; t=0.00 13:06:20

. 
. file write `T' "\bottomrule" _n
r; t=0.00 13:06:20

. file write `T' "\end{tabular}" _n
r; t=0.00 13:06:20

. file write `T' "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:06:20

. file write `T' "\item \textit{Notes}: The table documents that the Wave-2 attenuation of the per-capita consumptio
> n effect is robust to alternative specifications. Panels A--E report fuzzy-RD LATEs (\texttt{rdrobust}, triangular
>  kernel, MSE-optimal bandwidth, local-linear polynomial) on the indicated consumption measure, separately by wave;
>  the household PEP indicator is instrumented by eligibility. Panel~A is the baseline log per-capita consumption. P
> anel~B trims the top 1\% of per-capita consumption. Panel~C uses raw consumption levels (million COP). Panel~D use
> s log household-total consumption, which removes the per-capita denominator. Panel~E estimates the RD effect on ho
> usehold roster size, the per-capita denominator. Panel~F reports the share of respondents with missing consumption
> , by wave and eligibility. The attenuation survives outlier trimming, the raw-level and household-total specificat
> ions, and is not driven by a differential change in roster size at the cutoff (Panel~E is small and insignificant 
> in both waves). The one genuine data-quality concern is the rise in item nonresponse from roughly 0.1\% in Wave 1 
> to roughly 4.5\% in Wave 2 (Panel~F), slightly higher for eligibles, which could bias the Wave-2 estimate downward
> . \sym{+} \$p<0.10\$, \sym{*} \$p<0.05\$, \sym{**} \$p<0.01\$." _n
r; t=0.00 13:06:20

. file write `T' "\end{tablenotes}" _n
r; t=0.00 13:06:20

. file write `T' "\end{threeparttable}" _n
r; t=0.00 13:06:20

. file write `T' "\end{table}" _n
r; t=0.00 13:06:20

. file close `T'
r; t=0.00 13:06:20

. 
. di ""

r; t=0.00 13:06:20

. di "  26_ConsumptionRobustness.do done. Table: $atab/tabA_consumption_robustness.tex"
  26_ConsumptionRobustness.do done. Table: ../outputs/appendix/tables/tabA_consumption_robustness.tex
r; t=0.00 13:06:20

. log close
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/26_ConsumptionRobustness_log.txt
  log type:  text
 closed on:  25 Jun 2026, 13:06:20
--------------------------------------------------------------------------------------------------------------------
